<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:winter="http://www.winter.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="/layouts/layout">
	
	<div id="TextoFragment" th:fragment="texto">
		<winter:output id="TextoOutput">
			<winter:output id="mainTextoOutput">
				<div class="form-container">
			    	<winter:row>
			    		<winter:column type="col-md-4">
			    	   		<winter:inputtext
								id="NuevoControlTextoNro" 
								field="*{control.nrocontrol}"
								labeldisplay="col-xs-4"
								inputdisplay="col-xs-8"
								containerdisplay="row padded"
								class="winter-input-text"
								label="#{label.control.nrocontrol}"
								disabled="true">
							</winter:inputtext>
			    	   </winter:column>
			    	   <winter:column type="col-md-4">
			    	   		<winter:text
			    	   			id="TextoEscribano" 
								label="#{label.control.escribano}" 
								text="${beans.systemInfo.escribano.persona.nombreCompleto}"
								labeldisplay="col-xs-4"
								inputdisplay="col-xs-8"
								containerdisplay="row padded"
								if="${beans.systemInfo.escribano}">
							</winter:text>
			    	   </winter:column>
			    	   <winter:column type="col-md-4">
						  	<winter:select 
								id="NuevoTemplateTexto"
								field="*{texto.template}" 
								collection="tmp, rowtmp : ${controles.templates}"
								value="@{${tmp.id}+'|'+${tmp.nombre}}"
								text="@{${tmp.nombre}}"
								label="#{label.control.texto.template}"
								required="true"
								requiredmessage="Favor seleccione un template"
								modern="true"
								showglobalmessage="true">
							</winter:select>
						</winter:column>
			    	 </winter:row>
			    	  <winter:row class="button-panel-right" padded="true">
			    	 	<winter:ajaxSubmit 
							id="GenerarTexto" 
							form="ControlesForm"
							object="controles" 
							url="@{'/controles/generarTexto'}"
							update="TextEditorOutput"
							value="#{label.operaciones.generar}"
							showstatus="true"
							class="btn btn-success"
							immediate="true">
						</winter:ajaxSubmit>
			    	 </winter:row>
			    	 <winter:row>
						<winter:output id="TextEditorOutput">
							<winter:text-editor
								id="TextoTemplate"
								label="#{label.template.texto}"
								field="*{texto.texto}"
								labeldisplay="col-xs-8">
	                        </winter:text-editor>
						</winter:output>
					</winter:row>
				</div>
			</winter:output>
			<winter:row class="button-panel-right" padded="true">
				<winter:ajaxSubmit 
					id="CrearControlTexto" 
					form="ControlesForm" 
					url="@{'/controles/guardarTexto'}" 
					update="ControlesOutput"
					object="controles"
					value="#{label.operaciones.guardar}"
					showstatus="true"
					class="btn btn-cyan"
					confirmationrequired="true"
					confirmationtext="Está seguro que desea realizar la operación?"
					immediate="true">
				</winter:ajaxSubmit>
				<winter:ajaxSubmit 
					id="CrearControlTextoCancelar" 
					form="ControlesForm" 
					url="@{'/controles/cancelar/TEXTOS'}"
					update="ControlesOutput"
					value="#{label.operaciones.cancelar}"
					showstatus="true"
					class="btn btn-danger"
					immediate="true">
				</winter:ajaxSubmit>
			</winter:row>
		</winter:output>
	</div>
</html>